/*
 * sGame.cpp
 *
 *  Created on: 23.05.2011
 *      Author: 123
 */

#include "Game.h"




sGame::sGame() {



}

sGame::~sGame() {

}
void sGame::Run(){

	oslClearScreen(RGB(150,75,0));


	//Read the keys


	//move the chrono sprite

	Man.Control();

	Camera.Calc(&Man.x,&Man.y,&Man.DrawX,&Man.DrawY);

	Map.Draw(Camera.x,Camera.y);

	Man.Draw();


	oslDrawStringf(10,10,"%d,%d -1=%d 0=%d +1=%d  %d",Man.x,Man.y,Map.GetCrashLevel(Man.x-64,Man.y),Map.GetCrashLevel(Man.x,Man.y),Map.GetCrashLevel(Man.x+64,Man.y),Map.Ability(Man.x,Man.y));
}
void sGame::Load(){


	Man.Load();
	Map.Load("info/game.txt","info/Tex.txt");
	Man.SetMap(&Map);

}
